package com.atguigu.spzx.common.exception;

import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import lombok.Data;

@Data
public class GuiguException extends RuntimeException{

    private  Integer code;
    private String message;
    private ResultCodeEnum resultCodeEnum;

    public  GuiguException(ResultCodeEnum resultCodeEnum){
        this.resultCodeEnum=resultCodeEnum;
        this.code=resultCodeEnum.getCode();
        this.message=resultCodeEnum.getMessage();
    }
    public  GuiguException(Integer code,String message){
        this.code=code;
        this.message=message;
    }
}
